<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <style>
            #canvas{
                border:1px solid #000;
            }
        </style>
    </head>
    <body>
        <canvas id="canvas" width="800" height="800"></canvas>

        <script>
            /** @type {HTMLCanvasElement} */
            const canvas = document.querySelector("#canvas");
            const ctx = canvas.getContext("2d");

            ctx.beginPath();
            ctx.moveTo(100,170);
            let curveControl1 = [-100,550];
            let curveControl2 = [10,410];
            let curveEnd1 = [610,170]
            ctx.quadraticCurveTo(curveControl1[0],curveControl1[1],curveEnd1[0],curveEnd1[1])
            ctx.quadraticCurveTo(curveControl2[0],curveControl2[1],100,170)
            // ctx.closePath()
            ctx.fillStyle='#000'
            ctx.shadowBlur=30
            ctx.shadowColor='#000'
            ctx.fill()
            
        </script>
    </body>
</html>
